import request from '@/utils/request'

//获取供应商的所有类别和类别下商品
export const SupplierGetTypesAndGoods = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_GetTypesAndGoods',
        method: 'GET',
        params: obj
    })
}

/**
 * 获取供应商商品
 * @param {*} obj
 */
export const getSingleSupplierGoods = (obj) => {
    return request({
      url: "api/wechat/GetSingleSupplierGoods",
      method: "GET",
      params: obj,
    
    });
  };

  

//获取商品类型
export const getGoodsTypes = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_GetGoodsTypes',
        method: 'GET',
        params: obj
    })
}

//删除类别
export const SupplierDeleteType = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_DeleteType',
        method: 'POST',
        data: obj
    })
}

//编辑类别
export const SupplierEditType = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_EditType',
        method: 'POST',
        data: obj
    })
}

//类别置顶-取消置顶
export const SupplierTypeTop = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_TypeTop',
        method: 'POST',
        data: obj
    })
}

//新增类别
export const SupplierAddGoodsType = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_AddGoodsType',
        method: 'POST',
        data: obj
    })
}

//新增商品
export const SupplierAddGoods = (obj) => {
    return request({
        url: 'api/WeChat/SupplierAddGoods',
        method: 'POST',
        data: obj
    })
}

//文件上传
export const Upload = (obj) => {
    return request({
        url: 'api/Resource/Upload',
        method: 'POST',
        data: obj
    })
}

//补货
export const Buhuo = (obj) => {
    return request({
        url: 'api/WeChat/Buhuo',
        method: 'POST',
        data: obj
    })
}

//设置活动商品
export const SupplierPromoteGoods = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_PromoteGoods',
        method: 'POST',
        data: obj
    })
}

//取消活动商品
export const SupplierCancelPromoteGoods = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_CancelPromoteGoods',
        method: 'POST',
        data: obj
    })
}

//商品置顶-取消置顶
export const SupplierGoodsTop = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_GoodsTop',
        method: 'POST',
        data: obj
    })
}

//商品上架-下架
export const SupplierGoodsShelve = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_GoodsShelve',
        method: 'POST',
        data: obj
    })
}

//更新商品生产日期
export const SupplierUpdateBirthday = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_UpdateBirthday',
        method: 'POST',
        data: obj
    })
}

//修改商品类型
export const SupplierUpdateGoodsType = (obj) => {
    return request({
        url: 'api/WeChat/Supplier_UpdateGoodsType',
        method: 'POST',
        data: obj
    })
}


//获取商品资质
export const GetGoodsQualifications = (obj) => {
    return request({
        url: 'api/WeChat/GetGoodsQualifications',
        method: 'GET',
        params: obj
    })
}

//商品资质上传
export const UploadQualifications = (obj) => {
    return request({
        url: 'api/Resource/UploadQualifications',
        method: 'POST',
        data: obj
    })
}

//新增商品资质
export const AddQualifications = (obj) => {
    return request({
        url: 'api/WeChat/AddQualifications',
        method: 'POST',
        data: obj
    })
}

//删除商品资质
export const DeleteQualifications = (obj) => {
    return request({
        url: 'api/WeChat/DeleteQualifications',
        method: 'POST',
        data: obj
    })
}